package com.his.bean;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 用户收支记录
 * @TableName dzm_his_transaction_record
 */
public class DzmHisTransactionRecord implements Serializable {
    /**
     *
     */
    private Integer id;

    /**
     *
     */
    private Integer operatorId;

    /**
     * 医院id
     */
    private Integer hospitalId;

    /**
     * 用户ID
     */
    private Integer userId;

    /**
     * 收支类型：0进，1出
     */
    private Boolean typeId;

    /**
     * 交易金额
     */
    private BigDecimal amount;

    /**
     * 余额
     */
    private BigDecimal moneyBalance;

    /**
     * 冻结中金额
     */
    private BigDecimal moneyLock;

    /**
     * 交易时间
     */
    private String addtime;

    /**
     * 交易IP
     */
    private String ip;

    /**
     * 事由
     */
    private String memo;

    /**
     * 相关订单id
     */
    private Integer pkgId;

    private static final long serialVersionUID = 1L;

    /**
     *
     */
    public Integer getId() {
        return id;
    }

    /**
     *
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     *
     */
    public Integer getOperatorId() {
        return operatorId;
    }

    /**
     *
     */
    public void setOperatorId(Integer operatorId) {
        this.operatorId = operatorId;
    }

    /**
     * 医院id
     */
    public Integer getHospitalId() {
        return hospitalId;
    }

    /**
     * 医院id
     */
    public void setHospitalId(Integer hospitalId) {
        this.hospitalId = hospitalId;
    }

    /**
     * 用户ID
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * 用户ID
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * 收支类型：0进，1出
     */
    public Boolean getTypeId() {
        return typeId;
    }

    /**
     * 收支类型：0进，1出
     */
    public void setTypeId(Boolean typeId) {
        this.typeId = typeId;
    }

    /**
     * 交易金额
     */
    public BigDecimal getAmount() {
        return amount;
    }

    /**
     * 交易金额
     */
    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    /**
     * 余额
     */
    public BigDecimal getMoneyBalance() {
        return moneyBalance;
    }

    /**
     * 余额
     */
    public void setMoneyBalance(BigDecimal moneyBalance) {
        this.moneyBalance = moneyBalance;
    }

    /**
     * 冻结中金额
     */
    public BigDecimal getMoneyLock() {
        return moneyLock;
    }

    /**
     * 冻结中金额
     */
    public void setMoneyLock(BigDecimal moneyLock) {
        this.moneyLock = moneyLock;
    }

    /**
     * 交易时间
     */
    public String getAddtime() {
        return addtime;
    }

    /**
     * 交易时间
     */
    public void setAddtime(String addtime) {
        this.addtime = addtime;
    }

    /**
     * 交易IP
     */
    public String getIp() {
        return ip;
    }

    /**
     * 交易IP
     */
    public void setIp(String ip) {
        this.ip = ip;
    }

    /**
     * 事由
     */
    public String getMemo() {
        return memo;
    }

    /**
     * 事由
     */
    public void setMemo(String memo) {
        this.memo = memo;
    }

    /**
     * 相关订单id
     */
    public Integer getPkgId() {
        return pkgId;
    }

    /**
     * 相关订单id
     */
    public void setPkgId(Integer pkgId) {
        this.pkgId = pkgId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DzmHisTransactionRecord other = (DzmHisTransactionRecord) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOperatorId() == null ? other.getOperatorId() == null : this.getOperatorId().equals(other.getOperatorId()))
            && (this.getHospitalId() == null ? other.getHospitalId() == null : this.getHospitalId().equals(other.getHospitalId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getTypeId() == null ? other.getTypeId() == null : this.getTypeId().equals(other.getTypeId()))
            && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
            && (this.getMoneyBalance() == null ? other.getMoneyBalance() == null : this.getMoneyBalance().equals(other.getMoneyBalance()))
            && (this.getMoneyLock() == null ? other.getMoneyLock() == null : this.getMoneyLock().equals(other.getMoneyLock()))
            && (this.getAddtime() == null ? other.getAddtime() == null : this.getAddtime().equals(other.getAddtime()))
            && (this.getIp() == null ? other.getIp() == null : this.getIp().equals(other.getIp()))
            && (this.getMemo() == null ? other.getMemo() == null : this.getMemo().equals(other.getMemo()))
            && (this.getPkgId() == null ? other.getPkgId() == null : this.getPkgId().equals(other.getPkgId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOperatorId() == null) ? 0 : getOperatorId().hashCode());
        result = prime * result + ((getHospitalId() == null) ? 0 : getHospitalId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getTypeId() == null) ? 0 : getTypeId().hashCode());
        result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
        result = prime * result + ((getMoneyBalance() == null) ? 0 : getMoneyBalance().hashCode());
        result = prime * result + ((getMoneyLock() == null) ? 0 : getMoneyLock().hashCode());
        result = prime * result + ((getAddtime() == null) ? 0 : getAddtime().hashCode());
        result = prime * result + ((getIp() == null) ? 0 : getIp().hashCode());
        result = prime * result + ((getMemo() == null) ? 0 : getMemo().hashCode());
        result = prime * result + ((getPkgId() == null) ? 0 : getPkgId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", operatorId=").append(operatorId);
        sb.append(", hospitalId=").append(hospitalId);
        sb.append(", userId=").append(userId);
        sb.append(", typeId=").append(typeId);
        sb.append(", amount=").append(amount);
        sb.append(", moneyBalance=").append(moneyBalance);
        sb.append(", moneyLock=").append(moneyLock);
        sb.append(", addtime=").append(addtime);
        sb.append(", ip=").append(ip);
        sb.append(", memo=").append(memo);
        sb.append(", pkgId=").append(pkgId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
